package com.dzx.design.behavioral.memento;

import java.util.Stack;

/**
 * @author dzx
 * @ClassName:
 * @Description:
 * @date 2019年08月14日 16:35:26
 */
public class ArticleMementoManager {

    private  final Stack<ArticleMemento> articleMementoStack = new Stack<ArticleMemento>();

    public ArticleMemento getMemento(){
        ArticleMemento pop = articleMementoStack.pop();
        return  pop;
    }

    public void addMemento(ArticleMemento articleMemento){
         articleMementoStack.push(articleMemento);
    }
}
